import { _decorator, Component } from 'cc';
import logger from '../../Framework/log/Logger';
const { ccclass } = _decorator;


@ccclass('TestLog')
export class TestLog extends Component {

    protected start(): void {
        this._showLog();
    }

    showConfigLog() {
        logger.setTags(logger.Type.Config);
        this._showLog();
    }

    showAllLog() {
        logger.setTags(logger.Type.Trace | logger.Type.Config | logger.Type.Net | logger.Type.Model | logger.Type.Business | logger.Type.View);
        this._showLog();
    }

    private _showLog() {
        logger.trace("默认标准日志");
        logger.logConfig("灰色配置日志");
        logger.logNet("橙色网络日志");
        logger.logModel("紫色数据日志");
        logger.logBusiness("蓝色业务日志");
        logger.logView("绿色视图日志");
    }
}


